import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/Home.vue')
  },
  {
    path: '/player',
    name: 'Player',
    component: () => import('@/views/Player.vue')
  },
  {
    path: '/playlist',
    name: 'Playlist',
    component: () => import('@/views/Playlist.vue')
  },
  {
    path: '/music',
    name: 'Music',
    component: () => import('@/views/Music.vue')
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('@/views/Search.vue')
  },
  {
    path: '/my',
    name: 'My',
    component: () => import('@/views/My.vue')
  },
  // 添加歌单详情页面的路由
  {
    path: '/songlist/:id',
    name: 'SonglistDetail',
    component: () => import('@/views/SonglistDetail.vue')
  },
  {
    path: '/player-detail',
    name: 'PlayerDetail',
    component: () => import('@/views/PlayerDetail.vue')
  },
  // 添加歌手详情页路由
  {
    path: '/singer-detail',
    name: 'SingerDetail',
    component: () => import('@/views/SingerDetail.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router